package ling.archives.domain;

import com.easy.query.core.proxy.ProxyEntityAvailable;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;

import ling.archives.common.domain.entity.CreatedEntity;
import ling.archives.domain.proxy.ApprovalRecordProxy;
import lombok.Data;
import com.easy.query.core.annotation.*;
import lombok.experimental.FieldNameConstants;

/**
 * 审批记录;
 * @author : He-LiangLiang@Outlook.com
 * @date : 2025-2-25
 */
@ApiModel(value = "审批记录")
@Table("ar_approval_record")
@EntityProxy
@FieldNameConstants
@Data
public class ApprovalRecord extends CreatedEntity.LongId implements Serializable,Cloneable, ProxyEntityAvailable<ApprovalRecord , ApprovalRecordProxy> {
    /**
     * 流程类型名称:singleNode
     */
    @ApiModelProperty(value = "流程类型名称:singleNode", notes = "")
    private String flowType;
    /**
     *
     */
    @ApiModelProperty(value = "", notes = "")
    private Long flowId;

    /** 流程标题 */
    @ApiModelProperty(value = "流程标题",notes = "")
    private String flowTitle ;
    /** 审批流程；节点标识 */
    @ApiModelProperty(value = "审批流程；节点标识",notes = "")
    private String body ;


    /** 表单类型；节点类型1顺序节点;标记如何去解析数据：id引用，完整数据 */
    @ApiModelProperty(value = "表单类型；节点类型1顺序节点",notes = "标记如何去解析数据：id引用，完整数据")
    private String type ;


    /** 表单数据；节点审批者角色;类型的值：id引用：tabName-213 */
    @ApiModelProperty(value = "表单数据；节点审批者角色",notes = "类型的值：id引用：tabName-213")
    private String formData ;
    /** 审批人名称 */
    @ApiModelProperty(value = "创建人名称;审批人名称",notes = "")
    private String name ;
    /** 节点可审批的角色 */
    @ApiModelProperty(value = "节点可审批的角色",notes = "")
    private String nodeRole ;
//    /**
//     *
//     */
//    @ApiModelProperty(value = "", notes = "")
//    private String flowBody;
//    /**
//     * 表单类型
//     */
//    @ApiModelProperty(value = "表单类型", notes = "")
//    private String formType;
//    /**
//     * 表单数据
//     */
//    @ApiModelProperty(value = "表单数据", notes = "")
//    private String formData;
//    /**
//     * 所属流程节点
//     */
//    @ApiModelProperty(value = "所属流程节点", notes = "")
//    private String nodeId;
//    /**
//     * 节点类型：1顺序节点
//     */
//    @ApiModelProperty(value = "节点类型：1顺序节点", notes = "")
//    private Integer nodeType;
    /**
     * 审批人
     */
    @ApiModelProperty(value = "审批人", notes = "")
    private String approver;
    /**
     * 审批时间
     */
    @ApiModelProperty(value = "审批时间", notes = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date approvalTime;
    /**
     * 状态：状态：草稿0，通过1，驳回2,待审批3，撤回4，审批中5，已关闭6;每次审批更新节点状态，和根状态
     */
    @ApiModelProperty(value = "状态：草稿0，通过1，驳回2,待审批3，撤回4，审批中5，已关闭6", notes = "每次审批更新节点状态，和根状态")
    private String status;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注", notes = "")
    private String remark;

    public final static String  StatusDraft="0";
    public final static String  StatusPass="1";
    public final static String  StatusReject="2";
    public final static String  StatusWait="3";
    public final static String  StatusWithdraw="4";
    public final static String  StatusInProgress="5";
    public final static String  StatusClose="6";

}
